﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class easybbs_topic : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string myuid = Request["myuid"].ToString();
            myuid2.Text = myuid;
            string topicid = Request["topicid"].ToString();
            topicid2.Text = topicid;

            TBBSTopic.IncHit(topicid);
            TBBSTopic oTopic = new TBBSTopic(topicid);
            oTopic.Select();

            topictitle.InnerHtml = oTopic.TopicTitle + "(" + oTopic.TopicHit.ToString() + ")";

            TUser oUser = new TUser(oTopic.TopicAuthor);
            oUser.Select();
            
            authortime.InnerHtml = oUser.BigName + "&nbsp;" + oTopic.TopicTime;
            topiccontent.InnerHtml = oTopic.TopicContent;

            string sTitle = "<script>document.title='" + oTopic.TopicTitle + "';</script>";
            ClientScript.RegisterStartupScript(this.GetType(), "scripttitle", sTitle);
        }
    }
}
